using System;
using System.Collections.Generic;
using System.Text;

namespace Bbq.Gallery
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class GalleryAlbum : ICloneable
    {
        public GalleryAlbum()
        {
            this._pathFromRoot = string.Empty;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="GalleryAlbum"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        public GalleryAlbum(string name)
        {
            this._name = name;
        }

        private int _id;
        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        /// <value>The ID.</value>
        public int ID
        {
            get { return _id; }
            set { _id = value; }
        }


        private string _name;
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        private DateTime _createdDate;
        /// <summary>
        /// Gets or sets the created date.
        /// </summary>
        /// <value>The created date.</value>
        public DateTime CreatedDate
        {
            get { return _createdDate; }
            set { _createdDate = value; }
        }

        private DateTime _lastModifiedDate;
        /// <summary>
        /// Gets or sets the last modified date.
        /// </summary>
        /// <value>The last modified date.</value>
        public DateTime LastModifiedDate
        {
            get { return _lastModifiedDate; }
            set { _lastModifiedDate = value; }
        }

        private string _description;
        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>The description.</value>
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        private int _parentID;
        /// <summary>
        /// Gets or sets the parent ID.
        /// </summary>
        /// <value>The parent ID.</value>
        public int ParentID
        {
            get { return _parentID; }
            set { _parentID = value; }
        }

        private int _highlightPictureID;
        /// <summary>
        /// Gets or sets the highlight picture ID.
        /// </summary>
        /// <value>The highlight picture ID.</value>
        public int HighlightPictureID
        {
            get { return _highlightPictureID; }
            set { _highlightPictureID = value; }
        }

        private string _pathFromRoot;
        /// <summary>
        /// Gets or sets the path from root.
        /// </summary>
        /// <value>The path from root.</value>
        public string PathFromRoot
        {
            get { return _pathFromRoot; }
            set { _pathFromRoot = value; }
        }


		#region ICloneable Members

		/// <summary>
		/// Creates a new object that is a copy of the current instance.
		/// </summary>
		/// <returns>
		/// A new object that is a copy of this instance.
		/// </returns>
		public object Clone()
		{
			GalleryAlbum album = new GalleryAlbum(this._name);
			album._createdDate = this._createdDate;
			album._description = this._description;
			album._highlightPictureID = this._highlightPictureID;
			album._id = this._id;
			album._lastModifiedDate = this._lastModifiedDate;
			album._parentID = this._parentID;
			album._pathFromRoot = this._pathFromRoot;
			return album;
		}

		#endregion

        private System.Web.HttpContext _httpContext = null;
        /// <summary>
        /// Gets the HTTP context.
        /// </summary>
        /// <value>The HTTP context.</value>
        internal System.Web.HttpContext HttpContext
        {
            get { return _httpContext; }
        }

        #region Public functions
        /// <summary>
        /// Attaches the HTTP context.
        /// </summary>
        /// <param name="context">The context.</param>
        public void AttachHttpContext(System.Web.HttpContext context)
        {
            _httpContext = context;
        }

        /// <summary>
        /// Detaches the HTTP context.
        /// </summary>
        public void DetachHttpContext()
        {
            _httpContext = null;
        }
        #endregion
    }
}
